New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send kafka message in batch #1708
Conversation
According to the discussion in https://community.k6.io/t/suggestion-send-message-in-batch-for-k6-kafka-output/1068
Hi @RoySunnySean007 , can you:
Also unfortunately we release v0.29.0 on Monday ... by plan .. hopefully. And this just comes way too late to be included, probably. So I am just going to mark this for v0.30.0 and hopefully we will merge it early on in the release cycle :) |
Hey @RoySunnySean007, Nice job! 👍 How will this bulk sending of messages to Kafka deal with logging of any sorts, since you've effectively removed the logging code? |
Codecov Report
@@ Coverage Diff @@
## master #1708 +/- ##
==========================================
+ Coverage 71.37% 71.42% +0.05%
==========================================
Files 176 176
Lines 13679 13675 -4
==========================================
+ Hits 9764 9768 +4
+ Misses 3304 3296 -8
Partials 611 611
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Sorry we raised this PR a bit late...we lost some data... Thanks |
Dear @mostafa, Could u pls kindly help to review it? Any comment is appreciated, thx! |
for _, sample := range formattedSamples { | ||
msg := &sarama.ProducerMessage{Topic: c.Config.Topic.String, Value: sarama.StringEncoder(sample)} | ||
partition, offset, err := c.Producer.SendMessage(msg) | ||
if err != nil { | ||
c.logger.WithError(err).Error("Kafka: failed to send message.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to have logging while using c.Producer.SendMessages(msgList)
on Line 165?
} | ||
// Send message in batch | ||
c.Producer.SendMessages(msgList) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to have logging while using
c.Producer.SendMessages(msgList)
on Line 165?
That is, what happens if this line somehow fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Let me have a check. Thx @mostafa !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @RoySunnySean007 any movement on this change?
Thanks for all the work done here, but given that we are:
I will close this PR and ask that if you want to add this functionality to do so in the extension repo. |
According to the discussion in https://community.k6.io/t/suggestion-send-message-in-batch-for-k6-kafka-output/1068